<?
//include script to do user logins
include("login/authincludesessions.php");
?>

<html>

<?

include("header.php");
include("drawmap.php");

?>

<div id="rightpane">

<h2>Modify user entry</h2>

<?
//get search variable

$searchid= $_GET['searchid'];

?>

To change your location drag the green marker.



<table>

<form name="userdata" method= 'get' action=
'domodifyuser.php' >


<?

//check if logged in, otherwise give error
if($session->logged_in){

//set form variables to current entries in DB

include("./includes/dbconnect.php");

$result = mysql_query("SELECT * FROM nodes WHERE id=$searchid",$link);

if (!$result)
{
       echo "no results ";
}
else
{

//grab data from database
$row = mysql_fetch_array($result);

//Output user data to a form


//start the table
echo("table");

echo ("<p>  <form name='userdata' method= 'get'
action='http://192.168.2.37/~sk2/includes/domodifyuser.php' > \n");

//output the actual data
echo ("<tr><td>Id:</td<td><input type= 'text' readonly='true' name= 'uid' value=\"".
$row['id'] . "\" > </td></tr> \n");

echo ("<tr><td>Name:</td<td><input type= 'text' name= 'uname' value=\"".
$row['name'] . "\" > </td></tr>\n");

echo ("<tr><td>Latitude:</td<td><input type= 'text' name= 'ulat' id='ulat' value=\"".
$row['lat'] . "\" > </td></tr>\n");

echo ("<tr><td>Longitude:</td<td><input type= 'text' name= 'ulong' id='ulong' value=\"".
$row['lon'] . "\" > </td></tr>\n");

echo ("<tr><td>Ownerid:</td<td><input type= 'text' readonly='true' name= 'uownerid' value=\"".
$row['ownerid'] . "\" > </td></tr>\n");

echo ("<tr><td>Status:</td<td><select name=\"ustatus\">
 <option value =\"1\">Interest</option>
 <option value =\"2\">Active Node</option>
</select> <br>\n");

echo ("<tr><td>About:</td<td><input type= 'text' name= 'uabout' value=\"".
$row['about'] . "\" > </td></tr>\n");

echo ("<tr><td>Address:</td<td><input type= 'text' name= 'uaddress' value=\"".
$row['address'] . "\" > </td></tr>\n");

echo ("<tr><td>Url:</td<td><input type= 'text' name= 'uurl' value=\"".
$row['url'] . "\" > </td></tr>\n");

echo ("<tr><td>");
//finish off the form
echo ("<input type= 'hidden' name= 'commented' value= 'set' >\n");
echo ("<input type= 'submit' value= 'Submit' >\n");
echo ("</tr></td>");

echo ("</form>\n");

//finish off the table
echo("</table>");

}
}
else
{
echo ("You must log in to add a new node");
}

?>

</table>

</td>
</tr>
</table>


<script type="text/javascript">
//<![CDATA[



<?

//specify that we want this node to be draggable
$draggablenode=0;
$draggablenode=$searchid;

include("./includes/plotnodes.php");

?>

//]]>



</script>
</div>




</body>
</html>